/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package templatemethod;

/**
 *
 * @author Emmanuel
 */
public abstract class Automovil {
    
    public void desplazar()
    {
        acelerar();
        cambiarMarcha();
        frenar();
    }
 
    private void acelerar()
    {
        System.out.println("Acelerando...");
    }
 
    private void frenar()
    {
        System.out.println("Frenando...");
    }
 
    protected abstract void cambiarMarcha();
    
}
